<div id="history">
    
    <h1>Your Order History</h1>
    
    <table>
        <tr>
            <th></th>
            <th>Date</th>
            <th>Movie</th>
            <th>Show time</th>
            <th>Cinema</th>
            <th>QTY</th>
            <th>THB</th>
        </tr>   
        <?php foreach($bookings as $index => $booking): ?>
        <tr>
            <td><?php echo $index +1;?></td>
            <td><?php echo date('D j M Y',strtotime($booking->start_time));?></td>
            <td><?php echo $booking->movie_title;?></td>
            <td><?php echo date('H:i',strtotime($booking->start_time));?></td>
            <td><?php echo $booking->branch_name;?></td>
            <td><?php echo $booking->qty;?></td>
            <td><?php echo $booking->qty * 140;?> THB</td>
        </tr>    
        <?php endforeach ?>
    </table>    
</div>    